﻿using System;
namespace Shuzujisuan
{
    class Shuzu
    {
        static void Main(string[] args)
        {
            int [] array =  { 1, 2, 6, 17, 25 };

            int max = 0;
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i] > max)
                {
                    max = array[i];
                }
            }

            int min = 0;
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i] < min)
                {
                    min = array[i];
                }
            }

            int sum = 0;
            for (int i = 0; i < array.Length; i++)
                sum += array[i];

            int average = sum / array.Length;

            Console.WriteLine("数组最大值为" + max);
            Console.WriteLine("数组最小值为" + min);
            Console.WriteLine("数组之和为" + sum);
            Console.WriteLine("数组平均值为"+average);
        }
    }
}